import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { TouchableOpacity, Image } from 'react-native'

const backIcon = require('../img/Normal/back.png')

export default class extends PureComponent {
  static propTypes = {
    backInvoke: PropTypes.func
  }
  render() {
    const { backInvoke } = this.props
    return (
      <TouchableOpacity onPress={backInvoke}>
        <Image
          source={backIcon}
          style={styles.backButtonIcon}
          resizeMode="contain"
        />
      </TouchableOpacity>
    )
  }
}


const styles = {
  backButtonIcon: {
    marginHorizontal: 15,
    width: 20,
    height: 20
  },
}
